load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//packages/ic-ed25519",
    "//packages/ic-secp256k1",
    "//packages/icrc-ledger-types:icrc_ledger_types",
    "//rs/ledger_suite/icp:icp_ledger",
    "//rs/types/types",
    "@crate_index//:actix-web-prom",
    "@crate_index//:anyhow",
    "@crate_index//:axum",
    "@crate_index//:bytes",
    "@crate_index//:candid",
    "@crate_index//:hex",
    "@crate_index//:http-body",
    "@crate_index//:http-body-util",
    "@crate_index//:hyper",
    "@crate_index//:ic-agent",
    "@crate_index//:lazy_static",
    "@crate_index//:num-bigint",
    "@crate_index//:prometheus",
    "@crate_index//:serde",
    "@crate_index//:serde_bytes",
    "@crate_index//:serde_json",
    "@crate_index//:serde_with",
    "@crate_index//:tokio",
    "@crate_index//:tower",
    "@crate_index//:tower-http",
    "@crate_index//:tracing",
]

MACRO_DEPENDENCIES = [
]

ALIASES = {
}

rust_test(
    name = "rosetta_core_unit_tests",
    crate = ":rosetta-core",
    deps = DEPENDENCIES,
)

rust_library(
    name = "rosetta-core",
    srcs = glob(["src/**"]),
    aliases = ALIASES,
    crate_name = "rosetta_core",
    proc_macro_deps = MACRO_DEPENDENCIES,
    deps = DEPENDENCIES,
)
